package Experiment.Text;

import java.util.Scanner;

public class Text4 {
    public static void main(String[] args) {
        System.out.println("陈杰202012900203");
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入等边三角形的边：");
        double side=sc.nextDouble();
        System.out.println("请输入圆的半径：");
        double radius=sc.nextDouble();
        Triangle triangle=new Triangle(side,"等边三角形");
        System.out.println("三角形的面积为："+triangle.getPerimeter());
        Circle circle =new Circle(radius,"圆");
        System.out.println("圆的周长："+circle.getPerimeter());
        MooCakeFactory mooCakeFactory=new MooCakeFactory();
        mooCakeFactory.produceMooCake(circle);
        mooCakeFactory.produceMooCake(triangle);
    }
}
